﻿@model Biblioteca.Models.Material

@{
    ViewBag.Title = "Agregar nuevo Material";
}

<h2>Agregar nuevo Material</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Nuevo Material</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.ISBN)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ISBN)
            @Html.ValidationMessageFor(model => model.ISBN)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Titulo)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Titulo)
            @Html.ValidationMessageFor(model => model.Titulo)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Sinopsis)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Sinopsis)
            @Html.ValidationMessageFor(model => model.Sinopsis)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.CantEjemplar)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.CantEjemplar)
            @Html.ValidationMessageFor(model => model.CantEjemplar)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Tipo, "Tipo Material")
        </div>
        <div class="editor-field">
            @Html.DropDownList("Tipo", String.Empty)
            @Html.ValidationMessageFor(model => model.Tipo)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Editorial, "Editorial")
        </div>
        <div class="editor-field">
            @Html.DropDownList("Editorial", String.Empty)
            @Html.ValidationMessageFor(model => model.Editorial)
        </div>

        <p>
            <input type="submit" value="Crear" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Volver al Listado", "Index")
</div>
